#ifndef __PVM3DEMULATION_H__
#define __PVM3DEMULATION_H__

#include "pvm/pvmapi.h"
#include "lib/3d/scalar.h"

namespace PVM3DSOFTWARENAMESPACE
{

void* P3DCreateListener(PVMDEVICE device);
void P3DDestroyListener(void* li);
PVMDEVICE P3DGetDevice(void* li);

pvm_bool P3DDisableListener(void* li);
pvm_bool P3DEnableListener(void* li);

pvm_bool P3DSetDistanceModel(void* li, pvm_int32 model);
pvm_bool P3DGetDistanceModel(void* li, pvm_int32* model);
pvm_int32 P3DGetDistanceModelsSupport();

pvm_bool P3DSetListenerPosition(void* li, pvmlib::scalar x, pvmlib::scalar y, pvmlib::scalar z);
pvm_bool P3DSetListenerVelocity(void* li, pvmlib::scalar x, pvmlib::scalar y, pvmlib::scalar z);
pvm_bool P3DSetListenerOrientation(void* li, pvmlib::scalar xFront, pvmlib::scalar yFront, pvmlib::scalar zFront, pvmlib::scalar xTop, pvmlib::scalar yTop, pvmlib::scalar zTop);
pvm_bool P3DSetDopplerFactor(void* li, pvmlib::scalar factor);
pvm_bool P3DSetUnitSize(void* li, pvmlib::scalar size);

pvm_bool P3DGetListenerPosition(void* li, pvmlib::scalar* x, pvmlib::scalar* y, pvmlib::scalar* z);
pvm_bool P3DGetListenerVelocity(void* li, pvmlib::scalar* x, pvmlib::scalar* y, pvmlib::scalar* z);
pvm_bool P3DGetListenerOrientation(void* li, pvmlib::scalar* xFront, pvmlib::scalar* yFront, pvmlib::scalar* zFront, pvmlib::scalar* xTop, pvmlib::scalar* yTop, pvmlib::scalar* zTop);
pvm_bool P3DGetDopplerFactor(void* li, pvmlib::scalar* factor);
pvm_bool P3DGetUnitSize(void* li, pvmlib::scalar* size);


pvm_bool P3DControlEnable(void* li, pvm_int32 chanelNum);
pvm_bool P3DControlDisable(void* li, pvm_int32 chanelNum);
pvm_bool P3DIsControlEnabled(void* li, pvm_int32 chanelNum);

pvm_bool P3DSetVoicePosition(void* li, pvm_int32 chanelNum, pvmlib::scalar x, pvmlib::scalar y, pvmlib::scalar z);
pvm_bool P3DSetVoiceVelocity(void* li, pvm_int32 chanelNum, pvmlib::scalar x, pvmlib::scalar y, pvmlib::scalar z);
pvm_bool P3DSetVoiceDirection(void* li, pvm_int32 chanelNum, pvmlib::scalar x, pvmlib::scalar y, pvmlib::scalar z);
pvm_bool P3DSetVoiceMinDistance(void* li, pvm_int32 chanelNum, pvmlib::scalar d);
pvm_bool P3DSetVoiceMaxDistance(void* li, pvm_int32 chanelNum, pvmlib::scalar d);
pvm_bool P3DSetRolloffFactor(void* li, pvm_int32 chanelNum, pvmlib::scalar factor);
pvm_bool P3DSetStopOnDistance(void* li, pvm_int32 chanelNum, pvm_bool flag);
pvm_bool P3DSetVoiceRate(void* li, pvm_int32 chanelNum, pvm_int32 value);
pvm_bool P3DSetVoiceMaxVolume(void* li, pvm_int32 chanelNum, pvm_int32 value);

pvm_bool P3DGetVoicePosition(void* li, pvm_int32 chanelNum, pvmlib::scalar* x, pvmlib::scalar* y, pvmlib::scalar* z);
pvm_bool P3DGetVoiceVelocity(void* li, pvm_int32 chanelNum, pvmlib::scalar* x, pvmlib::scalar* y, pvmlib::scalar* z);
pvm_bool P3DGetVoiceDirection(void* li, pvm_int32 chanelNum, pvmlib::scalar* x, pvmlib::scalar* y, pvmlib::scalar* z);
pvm_bool P3DGetVoiceMinDistance(void* li, pvm_int32 chanelNum, pvmlib::scalar* d);
pvm_bool P3DGetVoiceMaxDistance(void* li, pvm_int32 chanelNum, pvmlib::scalar* d);
pvm_bool P3DGetRolloffFactor(void* li, pvm_int32 chanelNum, pvmlib::scalar* factor);
pvm_bool P3DGetStopOnDistance(void* li, pvm_int32 chanelNum, pvm_bool* flag);
pvm_bool P3DGetVoiceRate(void* li, pvm_int32 chanelNum, pvm_int32* value);
pvm_bool P3DGetVoiceMaxVolume(void* li, pvm_int32 chanelNum, pvm_int32* value);

void P3DUpdate(void* li);
};

#endif
